package constant

const (
	Start   = iota // 启动
	Stop           // 停止
	Restart        // 重启
	Kill           // 杀掉
	Pause          // 暂停
	Unpause        // 暂停之后启动
	Rename         // 重命名
	Remove         // 移除
)

var dockerHealth = []string{"starting", "healthy", "unhealthy", "none"}
var dockerStatus = []string{"created", "restarting", "running", "removing", "paused", "exited", "dead"}

// IncludeHealth 判断是否包含指定的Health
func IncludeHealth(target string) bool {
	if target == "" {
		return false
	}
	for _, health := range dockerHealth {
		if health == target {
			return true
		}
	}
	return false
}

func IncludeStatus(target string) bool {
	if target == "" {
		return false
	}
	for _, status := range dockerStatus {
		if status == target {
			return true
		}
	}
	return false
}

var (
	OrderAsc  = true
	OrderDesc = false
)
